wx.cloud.init()
const db = wx.cloud.database()
const todosCollection = db.collection('data_book')
Page({

  data: {
    password:"",
    stu_number:'',
    phone:'',
    address:'',
    statue:'',
  },


 
  formSubmit(e) {
   let data = e.detail.value;
   console.log(data.stu_number);
    todosCollection.add({
      data:{
        title:data.title,
        position:data.position,
        intime:data.intime,
        total_number:data.total_number,
        stock_number:data.stock_number,
        
      }
    }).then(res => {
      wx.showModal({  
        content: '登记成功',
        showCancel: false,
        success(res) {}
      })


      wx.navigateTo({
        url: '../adminInformation/adminInformation'
      })
    })
  },
  

})